<%@ page pageEncoding="utf-8" language="java"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html:html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<html:base/>
	<link rel="stylesheet" href="<c:out value="${ctx}"/>/styles/style1.css" type="text/css" />
	<title>修改密碼頁面</title>
	<script type="text/javascript" src="<c:out value="${ctx}"/>/js/jquery/jquery.js"></script>
	<script type="text/javascript" src="<c:out value="${ctx}"/>/js/jquery/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<c:out value="${ctx}"/>/js/jquery/jquery.metadata.js"></script>
	<script type="text/javascript">
	$(function() {
		$("#passwordForm").validate({
			meta: "validate",
			messages:{
				oldPassword:{
					required: "請輸入舊密碼"
				},
				newPassword:{
					required: "請輸入新密碼"
				},
				newPasswordAgain:{
					required: "請再次輸入新密碼",
					equalTo:"兩次密碼輸入不一致"					
				}				
			}
		});
	});
	</script>
</head>
<body>
<form id='passwordForm' name='passwordForm' action='<c:out value="${ctx}"/>/changePwd.do' method="post">
	<html:hidden property="op" name="passwordForm"/>
	<html:hidden property="userId" name="passwordForm" />
	<div id="DataArea">
	<table width="100%" border="0">
		<tr>
			<th class="th" colspan="2" >密碼管理</th>
		</tr>
		<tr></tr>
		<tr>
			<td class="title">舊密碼</td>
			<td class="one">
			<input type="password" name="oldPassword" id="oldPassword" class="{validate:{required:true}}" size="20"/>
			</td>
		</tr>
		<tr>
			<td class="title">新密碼</td>
			<td class="one">
			<input type="password" name="newPassword" id="newPassword" class="{validate:{required:true}}"  size="20"/>
			</td>
		</tr>
		<tr>
			<td class="title">新密碼确认</td>
			<td class="one">
			<input type="password" name="newPasswordAgain" id="newPasswordAgain" class="{validate:{required:true, equalTo: '#newPassword'}}" size="20"/>
			</td>
		</tr>		
	</table>
	</div>
	<div id="send">
		<input type="submit" name="save" id="save" value=" 儲存" />
		<input type="button" name="back" id="back" value="上一頁" onclick="history.go(-1);" />
	</div>
</form>
</body>
</html:html>